Skip to content

feat: add timestamp-based branch naming option for specify init#1911

Merged
mnriem merged 5 commits intogithub:mainfrom
amweiss:feat/timestamp-branch-numbering
Mar 20, 2026
Merged

feat: add timestamp-based branch naming option for specify init#1911
mnriem merged 5 commits intogithub:mainfrom
amweiss:feat/timestamp-branch-numbering

Conversation

@amweiss
Copy link
Contributor

@amweiss amweiss commented Mar 19, 2026

Description

Add --branch-numbering flag to specify init supporting 'sequential' (default, 001/002/003) or 'timestamp' (YYYYMMDD-HHMMSS) prefix modes. Timestamp mode is useful for distributed teams to avoid numbering conflicts. Config is persisted in init-options.json and the AI agent template reads it to pass --timestamp to the create-new-feature script.

Relates to #1382

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

Claude generated much of the code based on an existing patch we use that forces timestamps where this is an option.

@amweiss amweiss requested a review from mnriem as a code owner March 19, 2026 19:05
Copilot AI review requested due to automatic review settings March 19, 2026 19:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an opt-in timestamp-based feature branch prefix mode to Spec Kit initialization, persisting the choice in .specify/init-options.json and documenting how agents should invoke feature-creation scripts accordingly.

Changes:

  • Add --branch-numbering {sequential|timestamp} to specify init, validate it, and persist it to init options.
  • Add --timestamp/-Timestamp support to create-new-feature scripts and relax feature-branch validation to accept timestamp prefixes.
  • Update docs/templates and add initial test coverage for the new behavior.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/specify_cli/__init__.py Adds --branch-numbering option, validates it, and saves branch_numbering into init options.
scripts/bash/create-new-feature.sh Adds --timestamp mode and handles conflicts with --number.
scripts/bash/common.sh Allows timestamp-prefixed branches in feature-branch validation and prefix resolution.
scripts/powershell/create-new-feature.ps1 Adds -Timestamp mode and adjusts truncation math for variable prefix length.
scripts/powershell/common.ps1 Allows timestamp-prefixed branches and prefers timestamp spec dirs when inferring branch in no-git scenarios.
templates/commands/specify.md Instructs agents to read branch_numbering and pass --timestamp/-Timestamp when configured.
README.md Documents the new --branch-numbering option and adds an example.
tests/test_branch_numbering.py Adds basic tests around persisting branch_numbering and enumerating valid values.
tests/test_timestamp_branches.sh Adds a shell-based test suite for timestamp behavior in bash scripts/common helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you avoid doing large whitespace changes it makes it hard to see what changed

@amweiss
Copy link
Contributor Author

amweiss commented Mar 19, 2026

Can you avoid doing large whitespace changes it makes it hard to see what changed

There was a merge conflict on the README I did wrong; were there more large whitespace issues you saw?

Copy link
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address Copiot feedback. If not applicable, please explain why

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@amweiss amweiss force-pushed the feat/timestamp-branch-numbering branch from bf2b23e to 77cf88b Compare March 19, 2026 20:06
Copilot AI review requested due to automatic review settings March 19, 2026 20:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Comments suppressed due to low confidence (1)

templates/commands/specify.md:89

  • The IMPORTANT bullet says the script "determines the correct next number automatically", which isn't accurate in timestamp mode (there is no number; --number is ignored and a timestamp is generated). Reword this bullet to cover both modes (e.g., don't pass --number; in sequential it's auto-detected, in timestamp it's ignored).
   **IMPORTANT**:
   - Do NOT pass `--number` — the script determines the correct next number automatically
   - Always include the JSON flag (`--json` for Bash, `-Json` for PowerShell) so the output can be parsed reliably

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@amweiss
Copy link
Contributor Author

amweiss commented Mar 19, 2026

Please address Copiot feedback. If not applicable, please explain why

@mnriem copilot feedback addressed and whitespace issue from merge resolved.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 20, 2026 13:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mnriem mnriem merged commit 65ecd53 into github:main Mar 20, 2026
11 of 12 checks passed
kanfil added a commit to tikalk/agentic-sdlc-spec-kit that referenced this pull request Mar 20, 2026
Upstream changes merged:
- feat: add Junie agent support (github#1831)
- feat: add timestamp-based branch naming option (--branch-numbering) (github#1911)
- fix: Align native skills frontmatter with install_ai_skills (github#1920)
- docs: add Extension Comparison Guide for community extensions (github#1897)
- docs: update SUPPORT.md, fix issue templates, add preset submission template (github#1910)

Tikalk customizations preserved:
- Orange theme (ACCENT_COLOR = #f47721)
- --team-ai-directives CLI parameter
- Skills package manager (specify skill subcommand)
- Bundled extensions/presets installation
- Pre-Installed Extensions panel

Version: 0.1.16
kanfil added a commit to tikalk/agentic-sdlc-spec-kit that referenced this pull request Mar 20, 2026
…v0.1.16)

Upstream changes (6 commits):
- feat: add Junie agent support (github#1831)
- feat: add timestamp-based branch naming option (--branch-numbering timestamp) (github#1911)
- fix: Align native skills frontmatter with install_ai_skills (github#1920)
- docs: add Extension Comparison Guide for community extensions (github#1897)
- docs: update SUPPORT.md, fix issue templates, add preset submission template (github#1910)
- docs: update publishing guide with Category and Effect columns (github#1913)

Tikalk customizations preserved:
- Orange branding theme (#f47721)
- --team-ai-directives CLI parameter
- Skills package manager (specify skill subcommand)
- Bundled extensions/presets installation
- --contracts/--data-models script options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants